package com.amigo.online.provider.user.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.amigo.online.common.base.controller.BaseController;
import com.amigo.online.common.core.response.Response;
import com.amigo.online.common.param.dto.user.RecordDeviceDto;
import com.amigo.online.provider.user.service.RecordDeviceService;

/**
 * @author kml 709628161@qq.com
 * @ClassName: PushMessageController
 * @Description: 消息推送
 * @date 2019年1月15日 下午6:08:18
 */
@RestController
@RequestMapping(value = "/message", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class PushMessageController extends BaseController {

    @Autowired
    private RecordDeviceService recordDeviceService;

    // 记录设备信息
    @PostMapping("/recordDevice")
    public ResponseEntity<Response> recordDevice(@RequestBody RecordDeviceDto dto) {
        return success(recordDeviceService.insert(dto));
    }
}
